package com.itheima.web.interceptor;

import com.itheima.domain.db.Admin;

/**
 * 参考 UserHolder
 */
public class AdminHolder {
    private static ThreadLocal<Admin> local = new ThreadLocal<>();

    public static Admin get(){
        return local.get();
    }

    public static void set(Admin admin){
        local.set(admin);
    }

    public static void remove(){
        local.remove();
    }
}
